.section .data
vec_x:
    .word 1
    .word 2
    .word 3
    .word 4
    .word 5
    .word 6
    .word 7
    .word 8
    .word 9
    .word 10
vec_y:
    .word 11
    .word 12
    .word 13
    .word 14
    .word 15
    .word 16
    .word 17
    .word 18
    .word 19
    .word 20
vec_z:
    .space 40

.section .text
.globl _start

_start:
    # 优化的向量加法: z = x + y
    la x5, vec_z
    la x6, vec_x
    la x7, vec_y
    li x29, 10
    la x5, vec_z
    la x6, vec_x
    la x7, vec_y
    li x29, 10
    li x28, 0
loop_start_1:
    slli x31, x28, 2
    add x30, x6, x31
    lw x10, 0(x30)
    add x30, x7, x31
    lw x11, 0(x30)
    add x10, x10, x11
    add x30, x5, x31
    sw x10, 0(x30)
    addi x28, x28, 1
    blt x28, x29, loop_start_1
loop_end_2:
    li a0, 0
    li a7, 93
    ecall